home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
elecmail
/
cs_mac07.zip
/
CS-COMMO.MAC
< prev
next >
Wrap
Text File
|
1993-03-28
|
42KB
|
924 lines
┌────────────────────────────────┐
│ Chuck Seyboldt's COMMO Macro │ CS-MAC07:CS-COMMO.MAC
└────────────────────────────────┘
* A new arrangement with this release. Variables are set in a .CFG file.
* You may rename this file to COMMO.MAC or use Commo's "/m" switch
* (as in /mcs-commo.mac) to allow COMMO.MAC and CS-COMMO.MAC to coexist.
* See CS-MAC.MAC for more explanations.
*
Thanks to Fred Brucker for Commo and to ...
- Jim Bennett for many excellent macro suggestions
- Jim Rahfeldt for macro streamlining ideas
- Paula Stockholm for serious troubleshooting
- Dave Legault for the ongoing ideas and support
- My wife, Joy, for putting up with a Commo addict
*
* With this line in COMMO.SET, Commo starts with the :start macro
* └──┴─────> {mac=start} Startup macro label
*
* I use the :start/cs-macxx.cfg tool for easy portability from one machine
* to another. Many directories are defined in CS-MACxx.CFG.
! You need the edit the file you are reading -AND- COMMO.FON.
* Editing is required only at the *END* of CS-COMMO.MAC.
*
! Edit the .FON links at the _very_ end of this file [^PgDn].
! Please edit the autopilot before enabling it with "setv auto,y".
* There is no other required editing in the CS-MAC series.
┌─────────────────┐
│ Startup Macro │ In COMMO.SET, {mac=start} Startup macro label
└─────────────────┘
{:start}
{clea}
{setv ver,07} ;Version level set here
{ifex %_hom%cs-mac*.cfg,,new_user} ;If no .CFG exists, make one
{ifex %_hom%cs-mac%ver%.cfg,,upgrade} ;If old .CFG exists, upgrade
{rope %_hom%cs-mac%ver%.cfg,alcc} ;open .CFG file
{:init_loop}
{read line} ;read CS-MACxx.CFG
{inst line,*} {ifco init_loop} ;skip comments in .cfg
{comp line} {ifco init_loop} ;skip blank lines in .cfg
{inst line,,} {ifco ,init_loop} ;comma reqd in active .cfg line
{setv pos,%_pos} {decr pos}
{subs var,1,%pos,%line}
{inst line, } {ifco ,no_com} ;two consecutive spaces separate
{subs line,1,%_pos,%line} ; variable def'n from comment
{:no_com}
{inst line,,}
{setv pos,%_pos} {incr pos}
{leng %line}
{setv len,%_len} {decr len,%pos}
{subs valu,%pos,%len,%line}
{setv %%var,%valu} ;setv according to .cfg
{goto init_loop} ;loop until .cfg all read
{:upgrade} ;if old .cfg is found make
{setv ug,y} ; a new one for this version
{macl cs-mac.mac,upgrade}
{:new_user} ;if *NO* .cfg is found make one
{setv new,y} ;autoload macro menu; new user
{macl cs-mac.mac,new_user}
{:alcc} {capt n,%cap} ;capture filename from .CFG
{setv-e _uselog,DSZLOG} ;DSZlog info > COMMO.LOG
{:alc} ;CLEAR function ...
{parm ,,,,0} ; plus resets directories
{setv abbr} {setv bbsid} ; and working variables
{setv line} {setv var}
{setv valu} {setv ver}
{setv ring,0} {setv set} ;Autopilot ring counter
{setv pmail} ;ZIPNews personal mail flag
{setv rflag,aln} ;return flag for multidial
{clea} {disp 1,1}
{comp new,y} {ifco alm} ;New user taken directly to menu
{comp ug,y} {ifco alm} ;Upgrade taken directly to menu
{:no_new}
{comp auto,y}{ifco auto} ;Is autopilot enabled?
;END of startup macro
{:retu} {retu} ;Very handy labelname
macr_do
Run a Macro Choose Macro to Run
╒═══════════════════════╕
Add BBSID to COMMO.FON │ CS-MAC.MAC,new_bbsid │ {macl cs-mac.mac,new_bbsid}
New modem config │ CS-MAC.MAC,modem │ {macl cs-mac.mac,modem}
Run Agenda Generator │ CS-MAC.MAC,s_menu │ {setv auto} {macl cs-mac.mac,s_menu}
Run ACTION processor │ ACTION.MAC,action │ {macl action.mac,action}
Macro under development │ HOLO.MAC,start_ho │ {macl holo.mac,start_ho}
Strip comments from MAC │ CS-MAC.MAC,strip │ {macl cs-mac.mac,strip}
Translate MODEMs.DAT │ CS-MAC.MAC,x_late │ {macl cs-mac.mac,x_late}
RingLOG Macro {:sf5} │ RINGLOG.MAC,g01 │ {setv set} {comp auto,y} {ifco auto} {macl ringlog.mac,g01}
DosFunc Macro {:nf9} │ DOSFUNC.MAC,g01 │ {macl dosfunc.mac,g01}
Make ACTION {:alf} │ ACTION.MAC, alf │ {macl action.mac,alf}
Load HOST Mode {:af5} │ MACROBBS.MAC,bbs │ {macl macrobbs.mac,bbs}
│ EDIT File Menu │ {call ale} {}
╘═══════════════════════╛
upld
Send a File UpLoad Protocols
╒════════════════╕
│ Zmodem │ {call cpu} {setv file} {exec-n %z_prog port %_por ha bo sz -m @%_hom%files.zup} {}
│ Zmodem/REP │ {inpu bbsid,.REP to Upload} {ifex %repdr\%bbsid.rep,,no_rep} {exec-N %z_prog port %_por ha bo sz -mu %repdr%\%bbsid%.rep} {:no_rep} {}
│ Ymodem/G │ {call cpu} {setv file} {symo-gk @%_hom%files.zup} {}
│ 1k-Xmodem │ {setv proto,1K-Xmodem} {call gfnu} {sxmo-k %file} {setv proto} {}
│ Xmodem CRC │ {setv proto,Xmodem-CRC}{call gfnu} {sxmo %file} {setv proto} {}
│ HS/Link │ {call cpu} {setv file} {exec-n %dosdir%\hslink.exe -@ -I2 -NV -P%_por% @%_hom%files.zup} {}
│ │
│ ASCII │ {setv proto,ASCII} {call gfnu} {ascii-e %file} {}
╘════════════════╛
downld
Receive a File DownLoad Protocols
╒════════════════╕
│ Zmodem │ {exec-n %z_prog port %_por rz -mr %dldir} {}
│ Zmodem/QWK │ {exec-n %z_prog port %_por rz -m %qwkdr} {}
│ Ymodem/G │ {rymo-gy %dldir} {}
│ 1k-Xmodem │ {setv file,%dldir%\} {inpu file,Filename to Download (1k-Xmodem)} {rxmo %file} {}
│ Xmodem CRC │ {setv file,%dldir%\} {inpu file,Filename to Download (Xmodem CRC)} {rxmo %file} {}
│ HS/Link │ {exec-n %dosdir%\hslink.exe -@ -C -I2 -NV -P%_por% -R -O -K -U%dldir} {}
│ Ymodem │ {rymo-y %dldir} {}
│ ASCII │ {call chm} {}
╘════════════════╛
{:alm} {macr macr_do} {retu} ;Run a Macro menu
{:pgd} {macr downld} {retu} ;Call Download Menu
{:pgu} {macr upld} {retu} ;Call Upload Menu
{:cpu} {exec-n cd %uldir} ;Pick N Send
{exec-d %dosdir%\commopns.exe %_hom%files.zup -F}
{retu}
┌───────────────────────┐
│ Get Upload FileName │
└───────────────────────┘
* This version of :GFNU has some extra features. If you omit the file
* .extension, :gfnu looks for the file, adds ".ZIP" and looks for the file,
* if the file doesn't exist, a masked directory list is presented to jog
* your memory.
{:gfnu} {sete-p0 retu}
{setv file,%uldir\%mask} {setv dmask} {setv mask}
{inpu file,Filename for %proto% upload (.ZIP default)}
{ifex %file,retu}
{leng %uldir} {setv dr_len,%_len}
{leng %file} {setv f_len,%_len}
{incr dr_len} {decr f_len,%dr_len} {incr dr_len}
{instring file,.} {ifco chek}
{setv file,%file%.zip}
{:chek} {ifex %file,retu}
{:mask} {subs dmask,%dr_len,1,%file}
{subs mask,%dr_len,%f_len,%file}
{exec-nw5 dir %uldir%\%dmask%*.*}
{goto gfnu}
┌───────────────────────────────┐
│ Send DESC.SDI Automatically │
└───────────────────────────────┘
* This INSERT-key routine sends either desc.sdi or file_id.diz
* If you use the INS routine immediatly after an upload, the
* correct filename will already be in the input window.
{:ins} {ifca ,retu} ;Auto Insert file descriptions
{sete-p0 retu}
{comp file} {ifco ,n_zup}
{ifex %_hom%files.zup,,retu}
{rope %_hom%files.zup}
{read file} {rclo}
{:n_zup}{inpu file,Filename to search for description}
{comp file} {ifco retu} {ifex %file,,retu}
{exec-d %pk_un -v %file desc.sdi file_id.diz}
{ifer 1,retu} {setv filen,file_id.diz}
{:add_dsc}
{exec-d %pk_un -v %file %filen}
{ifer 1,chk_sdi}
{exec-n %pk_un -o %file %ramdr\ %filen}
{rope %ramdr\%filen,retu}
{:diz_lp}
{setv filen}
{read line} {send ~~%line|}
{goto diz_lp}
{:chk_sdi}
{setv filen,desc.sdi}
{goto add_dsc}
┌───────────────────────────┐
│ Select Upload Directory │
└───────────────────────────┘
* This Alt-U macro has a twist to it. Pressing the ESCAPE key while in
* the INPUt window doesn't exit. Instead the ESCAPE key cycles through
* a variety of U/L directory choices before exiting.
{:alu} {setv count,0}
{:conf} {incr count}
{sete-p0 ul%count}
{inpu uldir,Select Upload directory (omit trailing"\")}
{ifex %uldir\NUL,retu,alu}
{:ul1} {setv uldir,%_hom}
{leng %_hom} {setv len,%_len}
{decr len} {subs uldir,1,%len,%uldir}
{setv len} {goto conf}
{:ul2} {setv uldir,%ramdr} {goto conf}
{:ul3} {setv uldir,%repdr} {goto conf}
{:ul4} {setv uldir,%dldir} {goto conf}
{:ul5} {retu}
┌──────────────────┐
│ File-Edit-Menu │
└──────────────────┘
{:ale} {setv _menu1, F any File}
{setv _menu2, T Table.mac}
{setv _menu3, L Logon.mac}
{setv _menu4, A Action.mac}
{setv _menu5, S cS-mac.mac}
{setv _menu6, X Xxxx.xxx}
{setv _menu7, M Macrobbs.mac}
{setv _menu8, H Holo.mac}
{setv _menu9, K assign.Key}
{setv _menu10, D aDdress book}
{setv _menu11, C Commo.mac}
{setv _menu12, N holo.mac NLBBS}
{setv _menu13, I Ideas}
{setv _menu14, Q Quiz.mac}
{setv _mlabel,ed_a,,ed_c,ed_d,,ed_f,ed_g,ed_h,ed_i,,ed_k,ed_l,ed_m,ed_n,,,ed_q,,ed_s,ed_t,,,,ed_x}
{menu 18,22, EDIT Menu }
{goto auto}
{:ed_f} {call nf5} {goto auto}
{:ed_t} {exec-n %ext_ed %_hom%table.mac} {goto auto}
{:ed_l} {exec-n %ext_ed %_hom%logon.mac} {goto auto}
{:ed_a} {exec-n %ext_ed %_hom%action.mac} {goto auto}
{:ed_s} {exec-n %ext_ed %_hom%cs-mac.mac} {goto auto}
{:ed_x} {exec-n %ext_ed %_hom%xxxx.xxx} {goto auto}
{:ed_m} {exec-n %ext_ed %_hom%macrobbs.mac} {goto auto}
{:ed_h} {exec-n %ext_ed %_hom%holo.mac} {goto auto}
{:ed_k} {edit %_hom%assign.key} {goto auto}
{:ed_d} {edit %savedir\address} {exec-n copy %savedir\address %utildir\phone.dir} {goto auto}
{:ed_c} {macl cs-mac.mac,ed_cmac}
{:ed_n} {exec-n %ext_ed %_hom%dl\test\*.mac}{goto auto}
{:ed_i} {exec-n %ext_ed %dldir\ideas} {goto auto}
{:ed_q} {exec-n %ext_ed %_hom%quiz.mac} {goto auto}
┌──────────────────────────────┐
│ Toggles and Autopilot mode │
└──────────────────────────────┘
{:alt} {togg}
{:a_yn} {setv _menu1, Y yes}
{setv _menu2, N no}
{setv _mlabel,,,,,,,,,,,,,,to_n,,,,,,,,,,,to_y}
{menu 6,23,Autopilot ON?} {retu}
{:to_n} {setv auto} {setv set} {setv pmail} {setv ring,0} {retu}
{:to_y} {setv auto,y} {goto auto}
┌───────────────────────┐
│ Toggle CAPTURE mode │
└───────────────────────┘
* This capture function provides a TOGGLE. Ctl-Home keystroke changes
* the status of capture and provides datestamp marks in the capture file.
{:chm} {comp capture,on} {ifco cof}
{setv capture,on}
{capt y,%savedir\%_mon%%_day%.cap}
{exec-n echo OPENED ■ %_dat %_tim^j>> %_cap} {retu}
{:cof} {setv capture} {capture n}
{exec-n echo CLOSED ■ %_dat %_tim^j■-■-■>> %_cap} {retu}
┌───────────────────────┐
│ Toggle Doorway Mode │
└───────────────────────┘
* This doorway mode toggle has a feature that you need to be aware of.
* The %xpert% flag will make this macro run through a series of possible
* "drop to DOS" commands for a variety of hosts (like the :alu macro).
* If %xpert% is null, this function is a simple toggle.
{:al=} {comp dway} {ifco ,ext}
{setv dway, }
{comp xpert} {ifco door}
{setv count,0}
{:donf} {incr count}
{sete-p0 dw%count}
{inpu dway,Host Doorway Command?}
{comp dway} {ifco retu}
{send %dway} ;BBSware Drop to DOS command
{:door} {door-m0} {}
{:dw1} {setv dway,9 y|} {goto donf} ;Various BBSware
{:dw2} {setv dway,aview|} {goto donf} ;Various BBSware
{:dw3} {setv dway,d~~~~%pword2|}{goto donf} ;"drop to DOS"
{:dw4} {setv dway} {retu}
{:ext} {door-m0}
{setv dway}
{comp xpert} {ifco retu}
{send exit|} ;Return from DOS to BBSware
{retu}
┌───────────────────┐
│---* General *---│
└───────────────────┘
{:alw} {setv file} ;Any Command at all
{inpu file,Enter any DOS Command:}
{comp file} {ifco retu} {exec-W %file} {}
{:gr*} {:cla} ;Test Command here
{disp ,,,This key is used to test any command}
{retu}
┌──────────────────────────┐
│---* Terminal Control *---│
└──────────────────────────┘
{:al0} {ligh} {retu} ;Toggle Signal Lights
{:al3} {soun} {retu} ;Toggle Mister Sound
{:al6} {loca} {retu} ;Toggle Local Echo
{:all} {dpar} {capt} {retu} ;Access Connect Parms
{:al-} {statusline} {retu} ;Toggle Status Line
{:alv} {comp vid} {ifco v_m1} ;Toggle video mode
{vide-m0}{setv vid} {retu}
{:v_m1} {vide-m1}{setv vid,1} {retu}
┌──────────────────────┐
│---* Send Strings *---│
└──────────────────────┘
{:nf1} {ifca ,hlp} {send ~~%name|} {retu};Send Name
{:nf2} {send %_pas|} {retu} ;Send Password
{:nf0} {ifca ,retu} ;Send Signature
{send %sig%|~|~SN|}{}
┌───────────────────┐
│---* Utilities *---│
└───────────────────┘
{:af1} {exec-d %z_prog t -8g} {retu} ;DSZ terminal shell
{:cf5} {:cky} {exec-d %utildir%\dfr.com} {retu} ;Directory Freedom
{:nf3} {setv file,%dldir%\} ;External List Pgm
{inpu file,File to List}
{exec-d %ext_li %file} {retu}
{:nf5} {setv file,%dldir%\} ;External Editor Pgm
{inpu file,File to Edit}
{exec-d %ext_ed %file} {retu}
{:nf6} {setv file} ;Dial Phone for voice
{inpu file,Name or Number to Call} : uses PHONE.EXE
{comp file} {ifco retu}
{exec-n phone %file} {retu}
{:nf4} {shel} ;Shell To DOS
{subs dr,1,1,%_hom} ;Now, return to Commo
{exec-n %dr:} ; home directory
{leng %_hom}{setv len,%_len}
{decr len}
{subs hom,1,%len,%_hom}
{exec-n cd %hom}
{setv dr} {setv len} {setv hom}
{retu}
{:alj} {exec-w15 mjog /l} {retu} ;Mjog
{:als} {exec-w15 set} {retu} ;See DOS Environment
{:al<} {setv file} {inpu file,See What Variable?} ;See a Commo variable
{comp file} {ifco retu}
{setv-s value,%file}
{inpu %%file,Variable %file,%value} {retu}
{:al.} {setv inpu} {inpu inpu,Variable,Setting} ;Set a Commo variable
{comp inpu} {ifco retu}
{setv %%inpu} {retu}
{:al/} {setv file} {inpu file,GOTO ":routine"} ;Goto a Commo Routine
{comp file} {ifco retu}
{rope %_mac,retu}
{:gto_loop}
{read line}
{inst line,:%file}
{ifco ,gto_loop}
{rclo}
{goto %file}
{:alb} {ifca ,backup} ;Dual use Alt-B
{brea} {retu} ; ONLINE = Break
{:backup}
{exec-n %pk_zip -a %savedir\mac %_hom%*.mac} ;Backup Commo Macros
{exec-n copy %savedir\mac.* %bu_dr} ;and personal business
{comp xpert,y} {ifco ,retu}
{exec-n %pk_zip -a %dldir\estate %dldir\estate %dldir\706}
{exec-n copy %dldir\estate.z?p %bu_dr}
{exec-n %pk_zip -a %savedir\$$ g:\q5\home.* g:\q5\trust.*}
{exec-n copy %savedir\$$.z?p %bu_dr}
{retu}
┌────────────────────────────────────────┐
│---* Commo Help and quick reference *---│
└────────────────────────────────────────┘
{:alk} {exec-w60 type %_hom%assign.key} {retu} ;Show Key Assignments
{:hom} {exec-d %ext_li %ins_dir\*.doc} {retu} ;List Commo DOCS
{:alh} {ifca ,hlp} {hang} {retu} ;Dual use of Alt-H
{:hlp} {help 0} {retu} ; Hangup or HELP
┌─────────────────────────┐
│---* Session History *---│
└─────────────────────────┘
{:upa} {screen n,%savedir\savescro} {scro} {retu} ;Enter Scrollback
{:dna} {exec-d %ext_ed %_cap} {retu} ;Edit Capture File
{:lfa} {exec-d %ext_li %_cap} {retu} ;List Capture File
{:rta} {exec-d %ext_li %savedir\*.cap} {retu} ;Review Past Capture
{:gr+} {screen y,%savedir\commo.scn} {retu} ;Capture Screen
{:gr-} {edit %savedir\commo.scn} {retu} ;Show Screen Capture
{:alr} {exec-d %ext_li %_uselog} {retu} ;Review Call Log
{:end} {inpu abbr,Which 2-letter ACTION File?} ;Edit ACTION File
{edit %_hom%action.%abbr} {retu}
{:al1} {inpu abbr,Show ->%abbr%<- ACTION} ;Show ACTION history
{comp abbr} {ifco retu}
{subs abbr,1,2,%abbr}
{exec-d %ext_li %savedir\*.%abbr} {retu}
┌──────────────────────────────────────────┐
│---* Directly view specific filenames *---│
└──────────────────────────────────────────┘
{:cf9} {exec-d %ext_li %savedir\answer1} {retu} ;View ANSWER1
{:cf0} {exec-d %ext_li %savedir\*.log} {retu} ;View COASTAL .log files
┌──────────────────────────┐
│---* Messaging macros *---│
└──────────────────────────┘
{:sf3} {exec-n %reader} {retu} ;Run Mail Reader Pgm
{:ala} {ifca ,a_yn} {asci %dldir%\,:} {retu} ;Ascii Upload
{:alo} {scre n,%_hom%quote.in} ;Capture/Quote Message
{scro} {edit %_hom%quote.in}
{ifex %_hom%quote.in,,equote}
{rope %_hom%quote.in,equote}
{:nline}{read line} {send ~-> %line%|}
{goto nline}
{:equote}{send ~|} {exec-n del %_hom%quote.in} {retu}
{:cf6} {inpu bbsid,Note to Edit?} ;Edit Notefile
{edit %savedir\%bbsid%}
{retu}
┌────────────────────┐
│---* Play Space *---│ {:alp} {macr playsp} {}
└────────────────────┘
* This area is useful for playing with new macro ideas.
* It is easily accessed with Alt-P
* {disp ,,,Hi %name%!} {}
┌───────────────────────────────────────────────┐
│ Send a random Tagline from your Mail Reader │
└───────────────────────────────────────────────┘
!{:cnd} {setv line,30} ;set the number of lines in tagfile
{setv sec,%_sec} ;maximum 60 lines
{divi sec,%line} ;divide a number from 0 to 60
; by #lines in tagfile.
{setv rem,%_rem} ;the remainder is a
{incr rem} ;pseudo random # from 1 to %line
{rope %tagfile,s_tag}
{setv count,1}
{:t_loop}
{read line} ;read a tagline
{comp count,%rem} ;compare currrent line# with random#
{ifco-E s_tag} ;if same, send_tagline
{incr count} ;otherwise read next tagline
{goto t_loop}
{:s_tag}
{send %line} ;send the tagline
{rclo} ;clean up open files
{setv sec} {setv rem} ;and variables
{retu}
┌────────────────────────────────────────────────────────┐
│ An automatic ASCII message entry system for PCBoards │
└────────────────────────────────────────────────────────┘
{:nf8} {setv file,%dldir%\} {inpu file,Name of Upload Message}
{ifex %file%,,n_e}
{parm ,,,,2} {send e|} {asci %file%,}
{parm ,,,,0} {send ~~|~~~sn|}
{look %bbs_pmt}
{disp ,,,^j^j}
{disp ,18,1E,▌ Erase %file%? [Y/n] ▐^m}
{setl 5,y_d,,}
{golo y_d,y}
{golo n_e,n}
{look 'N' Skips Message Delete}
{:y_d} {exec-n del %file}
{:n_e} {send ^h}{disp ,18,, ^m}{}
┌──────────────────────────────────────────────┐
│ A guarded Alt-X command when leaving Commo │
└──────────────────────────────────────────────┘
{:alx} {setv xtime,10} ;set time-to-exit
{setv count,0}
{sete-p0 noex}
{disp 24,1,74, EXIT ^(Commo^) at "%xtime" > }
{disp ,,70, Are you Sure? (Y/n) }
{disp 24,26}
{incr xtime}
{setv count,0} {setv resp} ;initialize variables
{:xlop} {setg 1,upct,n} {gets-h %resp,1,q_t} ;set up 1 second wait
{comp %resp,n} {ifco noex} ;compare response
{comp %resp,y} {ifco q_t} ;if resp = y, goto :q_t
{:upct} {disp 24,26,71,%count} {disp 24,26}
{incr %count} {comp %count,%xtime}
{ifco-G q_t,xlop} ;loop or :q_t
{:noex} {disp 24,1,, ^m}
{setv xtime}
{retu} ;decided to stay
{:q_t} {exit} ;normal exit from Commo
┌────────────────────────────────────────┐
│ A tool to search a file for a string │
└────────────────────────────────────────┘
{:cf3} {inpu file,Name to search from ADDRESS book}
{comp file}
{ifco retu}
{call search}
{setv oldrow,%_row} {setv oldcol,%_col}
{setv row,%_row} {decr row,2}
{disp %row,1,07, ^j}
{comp addr} {ifco retu}
{disp %row,1,20,%addr } {disp %oldrow,%oldcol}
{setv addr} {setv oldcol} {setv row}
{setv file} {setv oldrow} {retu}
{:search}
{rope %savedir\address,retu}
{:aloop}
{read addr}
{inst addr,%file} {ifco ,aloop}
{rclo} {retu}
┌────────────────────────────────────────────────────┐
│ Download list tagging using COMMO built-in tools │
└────────────────────────────────────────────────────┘
* Featuring dual-function Alt-D depending on ON/OFF line Status
{:ald} {ifca mlist} ;Alt-D first checks for CARRIER
{dial}{retu} ;If NO, bring up dialing directory
{:mlist}{scre n,%_hom%dl-list} ;If CARRIER ONLINE, name screen image
{scro} ;Enter scrollback mode:
* ; This is where you will tag files
* ; Use the "W" facility in scrollback
* ; Press C/R twice on each file to tag
* ; Press ESC to quit tagging. Next,
{edit %_hom%dl-list} ;Enter COMMO's built-in editor:
* ; Add or delete file names, 1 per line
* ; Description text will be stripped
* ; later in the macro.
{rope %_hom%dl-list} ;Open just made list
{read line} ;Read the first line
{rclo} ;Close the list
{comp line} ;Is the first line empty?
{ifco retu} ;If so, quit. Otherwise go on.
{setv file}
{inpu file,C/R to Start DownLoad Now} ;A chance to exit
{comp file} {ifco go-dl} {retu} ; before start of d/l.
{:go-dl}{send d|} ;To the BBS, the download command
* ; (or use the FLAG command)
{rope %_hom%dl-list,end-dl} ;Open file list for reading
{:next-1}
{read file} ;Read one complete line into %file%
{subst file,1,12,%file} ;Strip all but first 12 characters
{send ~~~%file%|} ;Send filename to BBS
{goto next-1} ;Repeat read unti dl-list is all read
{:end-dl}
{exec-n del %_hom%dl-list} ;Delete the list after sending
{send ~|} {retu} ;This macro is ended.
* ;Waiting for Auto-Zmodem d/l?
┌─────────────────────────────┐
│ REP Mark and Dial Routine │
└─────────────────────────────┘
* This automatic mark-and-dial routine will send your .REP files
* It bypasses .QWK download questions with the "SKIP" facility
{:sf4} {unma}
{ifex %repdr\*.rep,rep_mark}
{exec-n del %ramdr\rep_dir}
{setv skip}
{goto auto}
{:rep_mark}
{exec-n dir %repdr\*.rep > %ramdr\rep_dir}
{setv skip,y}
{rope %ramdr\rep_dir,aln}
{:r_loop}
{read file}
{inst file,rep} {ifco ,r_loop}
{subs file,1,6,%file}
{mark %file} {goto r_loop}
┌────────────────────────────────────────┐
│ Return Point from cs-mac agenda menu │
└────────────────────────────────────────┘
{:do_agenda}
{comp hold} {ifco retu}
{hold %hold} {clea}
{goto aln}
┌───────────────────────────────┐
│ Return Point From LOGON.MAC │
└───────────────────────────────┘
{:aln} dial-c 45, goto auto ;Optional simple Multi-dial & Return
┌────────────────────────────────────────┐
│ Dialing Marco for BBS Mailrun Events │ Adapted From: TIM SAARI
└────────────────────────────────────────┘
* If you enclose the above "(dial-c 45,) (goto auto)" in curly braces
* the more complex dialer below will be disabled.
{parm 19200}
{setv row,%_row}
{setv col,%_col}
{sete-p0 auto}
{disp 18,10,, }
{disp 19,10,, }
{disp %row,%col}
{setd 45,8}
{setv busy,0}
{setv nodt,0}
{setv voic,0}
{setv carr,0}
{:redial}
dial-c 1,,seeya
{dial-c 1,}
{comp _dtc,0} {ifco auto} ;no systems marked
{disp 18,23,0A, }
{disp 18,10,0A,Last Attempt: %_dialrt }
{disp %row,%col}
{comp _dialrt,BUSY} {ifco incbusy}
{comp _dialrt,NO DIAL TONE} {ifco incnodt}
{comp _dialrt,VOICE} {ifco incvoic}
{comp _dtc,3} {ifco inccarr} ;dialer timed out
{comp _dtc,4} {ifco redial} ;operator intervention
{:incbusy}
{incr busy}
{disp 19,10,0B,Busy: %busy}
{disp %row,%col}
{comp busy,45} number of redials for a BUSY result code
{ifco auto,redial}
{:inccarr}
{incr carr}
{disp 19,61,0B,No Answer: %carr}
{disp %row,%col}
{setv _dialrt,NO ANSWER}
{comp carr,5} ;unmark on fifth NO ANSWER
{ifco ,redial}
{unma-l} {goto redial}
{:incnodt}
{incr nodt}
{disp 19,22,0B,No Dial Tone: %nodt}
{disp %row,%col}
{comp nodt,10} ;number of redials for a NO DIAL TONE result code
{paus 120}
{ifco auto,redial}
{:incvoic}
{incr voic}
{disp 19,46,0B,Voice: %voic}
{disp %row,%col}
{comp voic,10} ;number of redials for a VOICE result code
{ifco ,redial}
{unma-l} {goto redial}
┌────────────────────────────────┐
│ Event Outdial Interupt Macro │
└────────────────────────────────┘
{:seeya}{disp ,,,%_dialrt}
{loca n}
{send ata|}
{loca y}
{setg ,,l,^M^J}
{gets constr,40}
{pause 12}
{send %constr%^M^J}
{send You have connected during an attemped mail run.^M^J}
{send Please try again later. See ya.^M^J}
{pause 9}
{hang y}
{look carrier}
{loca n}{retu}
┌─────────────┐
│ Autopilot │
└─────────────┘
* This routine is intended to be always running.
* It is active only when the internal variable %auto% = y
* If active, can be started with Alt-C or Alt-N (and stopped with "A").
* If inactive, can be started with Alt-T or Alt-A.
* It can start any event at a specified time of the day.
* It can run a different event on a particular day of the week.
* While running, :auto logs rings of the phone to a log.
* Enters an auto-answer mode if it receives a single ring.
* Exits auto-answer mode after 35 seconds of inactivity.
*
* You need to edit the autopilot to setup events and event timing.
┌──────────────────────────────────────┐
│ Autopilot converted to Simple Host │
└──────────────────────────────────────┘
* The core of the autopilot routine is later on. This subroutine will
* answer the phone on a pattern of "RING; wait 10-45 seconds; RING RING"
* You need a file called PASSWORD in your Commo home directory.
* The first line of the PASSWORD file is the HOST access protection.
{:ans} {disp 25,1,17,░░░░ ^(Commo^) Autopilot }
{disp 25,34,1e,Waiting for 2 RINGs }
{disp 25,63,17,%_12h%:%_min%.%_sec %_amp% ░░░░}
{disp %row,%col}
{setl 35,auto} ;35 seconds in callwait mode
{setv set,y} ;flag indicates callwait set
{look ring}
{disp 25,34,1f,Waiting for 1 RING }
{disp %row,%col}
{look ring}
{spdc y}
{send ~ATA~|}
{disp 25,34,1b,Waiting for CONNECT }
{disp %row,%col}
{look CONNECT}
{disp 25,34,1c,Waiting for Password}
{disp %row,%col}
{send ~~Hello^j^j|Enter Password: }
{paus 1}
{setg 15,gbye,n}
{gets-p pass,8,gbye}
{ifex %_hom%password,,gbye} ;quit if password file=NUL
{rope %_hom%password}
{read password}
{rclo}
{comp pass,%password}
{ifco ,gbye}
{setv pass}
{setv password}
{ifca ,nf4} ;for local HOST testing
{exec %utildir\doorway com%_por /m:60 /g:on /a:on /v:d^u /o:t /s:* /c:dos}
{paus 2}
{send ~~~~^m^jSee you later %name%^m^j~~}
{:gbye} {hang y}
{paus 5}
{goto auto} ;return to Autopilot
┌────────────────────────────────┐
│ RingLog portion of Autopilot │
└────────────────────────────────┘
* Sort of an expensive answering machine enhancement.
* This section of Autopilot logs telephone rings to a save file.
{:r_log}{exec-N echo Your Phone rang: %_dat at %_24h%:%_min%:%_sec% >> %savedir\ring.log}
{incr ring}
{incr ring_c}
{disp %row,%col}
{:nlop} {setl 10,ilop} ;After 10 seconds, return to outer loop
{golo r_log,RING}
{look Inside r_log now}
┌─────────────────────────────────────────┐
│ Set Autopilot Keyboard responses here │
└─────────────────────────────────────────┘
* Autopilot can respond to hot-key strokes from the keyboard.
{:iale} {call e_auto} {call ale} {goto auto} ;Edit menu on "E"
{:ialm} {call e_auto} {call alm} {goto auto} ;Macro edit on "M"
{:iald} {call e_auto} {call ald} {goto auto} ;Dialer on "D"
{:ialf} {call e_auto} {call alf} {goto auto} ;Filelist on "F"
{:ials} {call e_auto} {call nf4} {goto auto} ;Shell to DOS "S"
{:iala} {call e_auto} {goto a_yn} ;Autopilot OFF "A"
{:ialx} {call e_auto} {call alx} {goto auto} ;Exit Commo on "X"
{:ialk} {scro} {goto ilop} ;Scrollback on "K"
{:ialc} {exec-d %ext_li %_uselog} {goto ilop} ;Call Log on "C"
{:ialb} {call e_auto} {call alb} {goto auto} ;Backup on "B"
{:lll} {keys 76e0,51e0,4fe0} ;Edit log on "L"
{edit %savedir\ring.log} {goto ilop}
{:e_auto} ;End Autopilot subroutine
{stat y}
{setv ring_c}
{disp %row,%col,, ^h} {retu}
┌──────────────────────────┐
│ Autopilot Core Routine │
└──────────────────────────┘
* This is the core of the autopilot routine.
* Near the end of the core you will see the setting of event times as
* well as the event definitions.
{exec time} ;start here to test your event additions
{:auto} {comp auto,y} ;CS-MAC starts Autopilot here
{ifco ,retu}
{ifca retu} ;don't run autopilot when ONLINE
{sete-p0 e_auto}
{disp 23,1}
{setv row,%_row}
{setv col,%_col}
{setv ring_c,0}
{stat n}
{disp 25,1,4f,░░░░ ^(Commo^) Autopilot }
{disp 25,34,4e,ESCape quits }
{:ilop} {disp 25,63,4f,%_12h%:%_min%.%_sec %_amp% ░░░░}
{comp pmail} {ifco no_p} {disp 25,76,4d,P}
{:no_p} {comp set} {ifco nostar} {disp 25,75,4c,*}
{:nostar}
{comp ring,1} {ifco-l noring}
{disp 25,56,47,Rings} {disp 25,53,4b,%ring}
{:noring}
{disp %row,%col,, ^h}
{comp ring_c,1} {ifco-e ans} ;Goto simple host on 1 ring
{setv ring_c,0}
{setl 10,ilop} ;lookfor . . . indefinitely
{setv time,%_24h%:%_min}
! Any required editing is BELOW this line.
! {comp time,05:30} {ifco ev_1} ;Event 1 time here
! {comp time,18:00} ifco ev_2 ;Event 2 time here
! {comp time,23:59} {ifco ev_3} ;Event 3 time here
! {comp time,01:11} {ifco ev_4} ;Event 4 time here
! {golo r_log,RING} ;log "RING"
; (use your particular modem string)
{golo lll,l} ;List RING.LOG on "L"
{golo iale,e} ;Editor menu on "E"
{golo ialm,m} ;Macro editor on "M"
{golo iald,d} ;Dialing directory on "D"
{golo ialf,f} ;Make action file on "F"
{golo ials,s} ;Drop to DOS on "S"
{golo iala,a} ;Autopilot Toggle on "A"
{golo ialx,x} ;Goto Exit routine on "X"
{golo ialk,k} ;Scrollback on "K"
{golo ialc,c} ;Review call log on "C"
{golo ialb,b} ;Backup files "B"
{look Something that won't happen} {goto auto}
┌────────────────────────────────────────┐
│ Set Autopilot Event definitions here │
└────────────────────────────────────────┘
* Event_1 goes to label :sfa on Saturdays. This marks a bunch of BBS
* numbers for a weekend mailrun. If it isn't Saturday, goto :nfa instead.
* Event_2 happens later in the day. This is an Internet mailrun.
* Event_3 looks for .REP files and sends them at midnight.
* You could set other events (backups for example).
!{:ev_1} {call e_auto} {comp _dwn,6} {ifco sfa,nfa} ;see mark-and-dial
!{:ev_2} {call e_auto} {call afb} {goto auto} ;area for these labels
!{:ev_3} {ifex %repdr\*.rep,,nlop} {call e_auto} {goto sf4}
!{:ev_4} {call e_auto} {call alb} {goto auto}
┌────────────────────────┐ ┌───────────────────────┐
│ Links from COMMO.FON │ │ Generic Logon Alone │
└────────────────────────┘ └───────────────────────┘
* By using these three character linked macro names in your .FON directory
* you will be able to logon automatically to each of these BBS types.
* These logons will get you as far as the Main Board Command Prompt
* (No mail fetching will occur).
* COMMO.MAC gets some prompt information from TABLE.MAC then jumps
* to the generic logon routine in LOGON.MAC.
{:pcb} {macl table.mac,pcb} ;PCBoard v14.5
{:rma} {macl table.mac,rma} ;Remote Access
{:tag} {macl table.mac,tag} ;T.A.G.
{:s-f} {macl table.mac,s-f} ;Spitfire
{:gap} {macl table.mac,gap} ;GAP
{:wc!} {macl table.mac,wc!} ;Wildcat!
{:mac} {macl table.mac,mac} ;MacroBBS
{:max} {macl table.mac,max} ;Maximus BBS
┌──────────────────────────────────┐
│ .FON -> COMMO.MAC -> TABLE.MAC │
└──────────────────────────────────┘
* :qwk is the standard mailrun link to have in your .FON directory.
{:qwk} {macl table.mac,qwk} ;fetch BBS particulars
┌──────────────────────────┐
│ Mark and Dial routines │
└──────────────────────────┘
* These are quite specific to a COMMO.FON dialing directory.
* That's why you need to edit this area.
* Note the use of %rflag% to control dialing sequence. This is required
* because linked dialing macros jump to TABLE.MAC then to LOGON.MAC.
* LOGON.MAC returns to position ":%rflag" in this file (COMMO.MAC).
* If you run on Autopilot, you will probably be calling some of these
* "mark and dial" routines.
! If you don't run Autopilot, all editing is below this line
!{:nfb} {unma} {mark de2,de3} {goto aln}
!{:nf7} {unma} {mark Weather} {goto aln}
!{:nfa} {mark weather}
! {setv rflag,001}
! {setv skip} {goto aln}
!{:001} {mark de2,de3}
{setv rflag,aln} {goto aln}
!{:cfa} {unma} {mark ledge,datawarp} {goto aln}
!{:sfa} {mark de2,de3,maine,smvti,wolf's,direct,dataw,ledge,babb,after5,foxhole,weather}
{disp 6,21,1f,║ Weekend! Dial All ■ marked BBS's ║}
{setv skip} {goto aln}
!{:sf1} {unma} {mark Node4} {dial 15} {}
!{:sf2} {unma} {mark Director} {dial 15} {}
!{:wtr} {macl weather.mac,wtr}
┌────────────────────────────────────────┐
│ Mail Run Link from .FON to TABLE.MAC │
└────────────────────────────────────────┘
* With this tool you can mark multiple nodes of one BBS but make only one
* connect per BBS. After connecting, the macro unmarks nodes named here.
* After unmarking .FON entries, goto :qwk for routine logon and mail process.
!{:nlb} {unma de2,de3} {goto qwk} ;manipulate .FON